package com.mask.mk.vo.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mask.mk.pojo.Goods;
import com.mask.mk.pojo.OrderDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author: Joey
 * @Description: 发送前端的订单数据
 * @date:2023/4/26 15:45
 */
@Data
@Accessors(chain = true)
public class OrderResponse {

    @ApiModelProperty(value = "订单")
    private int orderId;

//    @ApiModelProperty(value = "用户id")
//    private int userId;

    @ApiModelProperty(value = "地址用户名")
    private String userName;

    @ApiModelProperty(value = "地址电话")
    private String userPhone;

    @ApiModelProperty(value = "地址id")
    private Integer addressId;

    @ApiModelProperty(value = "地址信息")
    private String addressInfo;

    @ApiModelProperty(value = "详细地址")
    private String addressDetailInfo;

    @ApiModelProperty(value = "商品总数")
    private int goodsNum;

    @ApiModelProperty(value = "商品总价")
    private int goodsTotalPrice;

    @ApiModelProperty(value = "支付方式")
    private String payWay;

    //0：生成未付款； 1：已付款； 2：待收货； 3：已完成； 4：退货状态 ;  5：订单取消
    @ApiModelProperty(value = "订单状态")
    private int orderStatus;

    @ApiModelProperty(value = "商品列表")
    private List<OrderDetail> orderDetails;

    //时间
    @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd",locale = "zh",timezone = "GMT+8")//HH:mm:ss
    private Date checkTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd",locale = "zh",timezone = "GMT+8")//HH:mm:ss
    private Date complishTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd",locale = "zh",timezone = "GMT+8")//HH:mm:ss
    private LocalDateTime createTime;
}
